package com.powernode;

/**
 * description 暂无描述
 * author smile
 * time 2023/3/13 19:42
 */
public class Vehicle {
    //属性
    /*float speed;
    float size;

    //方法
    public static void move(){

    }
    public  static  void setSpeed(int speed){

    }
    public  static  void  speedUp(){

    }
    public  static void  speedDown(){

    }

    public static void main(String[] args) {
        Vehicle sportsCar=new Vehicle();
        sportsCar.speed=120.8f;
        sportsCar.size=8.9f;
        System.out.println("速度："+sportsCar.speed);
    }
}
*/
    int speed;
    int size;
    public Vehicle(int a,int b){
        speed=a;
        size=b;
    }
    public Vehicle(){

    }
    public void setSpeed(int speed){
        System.out.println("速度为：" + speed);
    }
    public void setSize(int size){
        System.out.println("体积为：" + size);
    }
    public void speedUp(){
        speed=speed+15;
        System.out.println("加速后 " + speed);
    }
    public void speedDown(){
        speed=speed-10;
        System.out.println("减速后 " + speed);
    }
    public void move(){
        System.out.println("移动");
    }
}
